
#Region "Using Directives"

Imports System

#End Region

Namespace C4F.DevKit.Bluetooth.ObjectPushProfile

    ''' <summary>
    ''' Exception class. This exception is thrown by an ObjectTypeVerifier when
    ''' the object received is invalid.
    ''' </summary>
    <Serializable()> _
    Public Class OPPException
        Inherits Exception

#Region "Public Functions/Methods"

        ''' <summary>
        ''' Initializes the Message property of the new instance to a 
        ''' system-supplied message.
        ''' </summary>
        Public Sub New()

            MyBase.New()

        End Sub

        ''' <summary>
        ''' Initializes an object of this class and sets the Message property 
        ''' to the specified error message.
        ''' </summary>
        ''' <param name="message">The message that describes the error.</param>
        Public Sub New(ByVal message As String)

            MyBase.New(message)

        End Sub

        ''' <summary>
        ''' Initializes a new instance of the Exception class with a specified
        ''' error message and a reference 
        ''' to the inner exception that is the cause of this exception.
        ''' </summary>
        ''' <param name="message">The message that describes the error.</param>
        ''' <param name="innerException">The exception that is the cause of 
        ''' this exception.</param>
        Public Sub New(ByVal message As String, ByVal innerException As Exception)

            MyBase.New(message, innerException)

        End Sub

        ''' <summary>
        ''' Initializes a new instance of this class with serialized data.
        ''' </summary>
        ''' <param name="info">The SerializationInfo that holds the serialized
        ''' object data about the exception being thrown.</param>
        ''' <param name="context">The StreamingContext that contains contextual
        ''' information about the source or destination.</param>
        Protected Sub New(ByVal info As Runtime.Serialization.SerializationInfo, _
                           ByVal context As Runtime.Serialization.StreamingContext)

            MyBase.New(info, context)

        End Sub

#End Region

    End Class

End Namespace
